package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Description TODO
 * @Author itheima
 * @Date 2023-07-20 19:28
 */
@Mapper
public interface OrdersDetailMapper {

    /**
     * 用户下单插入订单明细表数据
     * @param ordersd
     */
    void insert(List<OrderDetail> ordersd);

    /**
     * 根据订单id查询订单明细
     * @param orderid
     * @return
     */
    @Select("select * from order_detail where order_id=#{orderId}")
    List<OrderDetail> findByorderDetailId(Long orderid);

}
